﻿ <!--百度编辑器-->
<script src="__PUBLIC__/admin/js/ueditor/ueditor.config.js"></script>
<script src="__PUBLIC__/admin/js/ueditor/ueditor.all.min.js"></script>
<div class="row">
    <div class="col-xs-12 col-md-12 col-lg-12">
        <div class="widget">
            <div class="widget-header bg-blue">
            	<i class="widget-icon fa fa-arrow-left"></i>
                <span class="widget-caption">文章设置</span>
                <div class="widget-buttons">
                    <a href="#" data-toggle="maximize">
                        <i class="fa fa-expand"></i>
                    </a>
                    <a href="#" data-toggle="collapse">
                        <i class="fa fa-minus"></i>
                    </a>
                    <a href="#" data-toggle="dispose">
                        <i class="fa fa-times"></i>
                    </a>
                </div>
            </div>
            <div class="widget-body" style="height: auto;">
				
				<div class="form-title">
                    <a href="/Admin/Infrastructure/article" class="btn btn-primary" data-loader="bb-loader" data-loadername="模块管理">
						<i class="fa fa-mail-reply"></i>返回
					</a>
                </div>
                
                <form id="bbForm" action="" method="post" class="form-horizontal"
                                                  data-bv-message=""
                                                  data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
                                                  data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
                                                  data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
                <input type="hidden" name="id" value="{$cache.id}">
                
                <div class="form-group">
				    <label class="col-lg-2 control-label">标题<sup>*</sup></label>
				    <div class="col-lg-4">
				    <input type="text" class="form-control" name="title" placeholder="必填"
				                                           data-bv-notempty="true"
				                                           data-bv-notempty-message="不能为空" value="{$cache.title}">
				    </div>
				</div>
               
                <div class="form-group">
				    <label class="col-lg-2 control-label">分类<sup>*</sup></label>
				    <div class="col-lg-4">
				    	<select name="assort">
				    		<option value="0">选择分类</option>
				    		<option value="1"  <if condition="$cache['assort'] eq 1 "> selected="selected"  </if> >洗涤护理</option>
    						<option value="2"  <if condition="$cache['assort'] eq 2 "> selected="selected"  </if> >纺织物品</option>
    						<option value="3"  <if condition="$cache['assort'] eq 3 "> selected="selected"  </if>>日常搭配</option>
    						<option value="4"  <if condition="$cache['assort'] eq 4 "> selected="selected"  </if>>生活常识</option>
    						<option value="5"  <if condition="$cache['assort'] eq 5 "> selected="selected"  </if>>推广活动</option>
				    	</select>
				    	
				    </div>
				</div>
                 
                 <div class="form-group">
                        <label class="col-lg-2 control-label">内容</label>
                        <div class="col-lg-4">
                        	<!--必须插入空input避免验证冲突--> 
                        	<input type="hidden">
                        	<script type="text/plain" id="J-ueditor">
								{$cache.content|htmlspecialchars_decode}
							</script>
                        </div>
                   </div>
	
                
               <div class="form-group">
                         <div class="col-lg-offset-2 col-lg-4">
                         <button class="btn btn-primary btn-lg" type="submit">保存</button>&nbsp;&nbsp;&nbsp;&nbsp;
                         <button class="btn btn-palegreen btn-lg" type="reset">重填</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
          
<!--面包屑导航封装-->
<div id="tmpbread" style="display: none;">{$breadhtml}</div>
<script type="text/javascript">
	setBread($('#tmpbread').html());
</script>
<script type="text/javascript">
	var ue = UE.getEditor('J-ueditor', {
		textarea:'content'//提交字段名，必须填写，数据库必须有此字段		
	});	
</script>
<!--表单验证与提交封装-->
<script type="text/javascript">
	$('#bbForm').bootstrapValidator({
		submitHandler: function (validator, form, submitButton) {
           var tourl="{:U('Admin/Infrastructure/article_set')}";
           var data=$('#bbForm').serialize();
           $.bb.ajax('post',tourl,data,null);
           return false;
        },
	});
</script>
<!--/表单验证与提交封装-->